<%@ page language="java" contentType="text/html; charset=UTF-8"%>

<!DOCTYPE html>
<html>
	<head>
		<title>商城后台_分类管理</title>
		<%@include file="../header.jsp" %>
		
		<style>
			body{padding-top: 70px;}
			.img-thumbnail{width: 80px; height: 80px;margin: 1px;}
		</style>
	</head>
	<body>
		<%@include file="top.jsp" %>
		
		<div class="container">
			<div class="span4">
				<ul class="nav nav-pills">
					<li class="dropdown" id="menutest1">
					   	<a class="dropdown-toggle" data-toggle="dropdown" href="#menutest1">
							订单的状态查询<i class="icon-search"></i>
							<b class="caret"></b>
						</a>
						<ul class="dropdown-menu">
							<li>
								<a href="${basePath }admin_toOrderUI.action?order.status=等待发货">等待发货</a>
							</li>
							<li>
								<a href="${basePath }admin_toOrderUI.action?order.status=未支付">未支付</a>
							</li>
							<li>
								<a href="${basePath }admin_toOrderUI.action?order.status=已发货">已发货</a>
							</li>
							<li>
								<a href="${basePath }admin_toOrderUI.action?order.status=已签收">已签收</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
			<div class="span10">
				<table class="table table-bordered table-condensed">
					<thead>
						<tr>
							<td>收货人</td>
							<td style="text-align: center;">商品信息</td>
							<td>金额</td>
							<td>状态</td>
						</tr>
					</thead>
					<tbody id="showdata">
						<s:iterator value="orderList" status="st">
							<tr id="tr_<s:property value="id" />" ondblclick="toDetail('<s:property value="id" />')">
								<td style="vertical-align: middle;"><s:property value="consignee" /></td>
								<td style="text-align: center;">
									<s:iterator value="orderItems">
										<img src="${basePath }img/goods/<s:property value="good.img"/>" class="img-thumbnail" >
									</s:iterator>
								</td>
								<td style="vertical-align: middle;"><s:property value="sumPrice" /></td>
								<td style="vertical-align: middle;"><s:property value="status" /></td>
							</tr>
						</s:iterator>
					</tbody>
				</table>
			</div>
		</div>
		
		<script>
			$('.dropdown-toggle').dropdown();
			
			function toDetail(id){
				window.location = "${basePath}admin_toOrderDetailUI.action?order.id="+id;				
			}
			
		</script>
	</body>
</html>
